<template>
  <a-date-picker v-model:value="value" :format="dateFormat" @change="change" />
</template>

<script>
import { ref } from '@vue/reactivity'
import moment from 'moment';
export default {
    props:{
        currentVal:{
            type:String,
            required:true
        }
    },
    setup(props){
        const dateFormat = 'YYYY/MM/DD';

        let value = ref(moment(props.currentVal, dateFormat))

        const change = (e)=>{
            console.log(e)
        }

        return{
            value,
            moment,
            dateFormat,
            change
        }
    }
}
</script>

<style>

</style>